package com.mashibing.internalcommon.remote;

import com.mashibing.internalcommon.dto.OrderInfo;
import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.internalcommon.request.DriverGrabRequest;
import com.mashibing.internalcommon.request.OrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "service-order",path = "/service-order")
public interface ServiceOrderClient {

    @RequestMapping(method = RequestMethod.POST, value = "/order/changeStatus")
    ResponseResult changeStatus(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/order/arrivedDeparture")
    ResponseResult arrivedDeparture(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/order/pickUpPassenger")
    ResponseResult pickUpPassenger(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/order/passengerGetOff")
    ResponseResult passengerGetOff(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST, value = "/order/cancel")
    ResponseResult cancel(@RequestParam Long orderId , @RequestParam String identity);

    @RequestMapping(method = RequestMethod.POST, value = "/order/pushPayInfo")
    ResponseResult pushPayInfo(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/order/grab")
    ResponseResult driverGrab(@RequestBody DriverGrabRequest driverGrabRequest);

    @RequestMapping(method = RequestMethod.POST, value = "/order/add")
    ResponseResult addOrder(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.GET, value = "/jmterTest/{orderInfoId}")
    void jmterTest(@PathVariable String orderInfoId);

    @RequestMapping(method = RequestMethod.GET, value = "/order/detail")
    ResponseResult<OrderInfo> detail(@RequestParam Long orderId);

    @RequestMapping(method = RequestMethod.POST, value = "/order/book")
    ResponseResult book(@RequestBody OrderRequest orderRequest);

    @RequestMapping(method = RequestMethod.POST,value = "/order/pay")
    ResponseResult pay(@RequestBody OrderRequest orderRequest);
}
